feat: 增强每日用量工具洞察#43
Open
kts-kris wants to merge 1 commit into
Open
Conversation
5463f25 to
cf402d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
用户价值
这次更新让 Codex Daily Token Usage 不只是一个 Token 计数器,而是更接近一份每日工作用量报告。
用户现在可以看清楚:今天的 Token 消耗主要来自普通对话,还是来自工具辅助工作。它可以帮助回答这些实际问题:
分享图也更适合用于汇报:现在不只展示 Token 总量和预估成本,也展示了这些用量背后的工作方式。
改动内容
function_callpayload;mcp__server__tool这类 MCP 工具名称;exec_command。codex-daily-token-usage的市场索引 checksum。为什么有价值
之前插件能告诉用户“消耗了多少 Token”,但很难解释“为什么会消耗这些 Token”。对于真实工作场景来说,这个区别很重要:
新增的工具调用率、调用密度和 Top 工具,可以让用户更容易理解自己的 Codex 使用模式,也让分享图从“数字截图”变成更有解释力的用量报告。
说明和边界
exec_command。mcp-request/tools/call或mcp__server__tool这类函数名时被统计。验证
jq empty index.jsonnode --check scripts/codex-daily-token-usage.jsnode --check outputs/codex-daily-token-usage.jsCODEX_DAILY_TOKEN_USAGE_SCRIPT=scripts/codex-daily-token-usage.js node ../test-codex-daily-token-usage.jsnode work/test-codex-daily-token-usage.jsgit diff --checkcreateShareBlob()生成分享图,并目视检查最终布局无明显错位和重叠。